const http = require('http')

const server = http.createServer((req, res)=>{
  // console.log('有请求进入了')
  let arr = []
  req.on('data',(data)=>{
    arr.push(data)
  })
  req.on('end', ()=>{
    let obj = Buffer.concat(arr).toString()
    console.log('服务端数据接收',obj)
    res.end('数据拿到了')
  })
})
server.listen(1234,()=>{
  console.log('http服务开始运行')
})
